package com.star.jersey.example.redis.demo;

import com.star.jersey.redis.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 控制器
 * @motto: 代码源于生活，高于生活艺术
 * @author: zhouhengzhe
 * @date: 2022/10/18 15:16
 * @since 1.0
 **/
@RestController
public class DemoController {

    @Autowired
    private RedisService redisService;

    @PostMapping("/testSet")
    public Object testSet() {
        redisService.set("zhz", "1");
        return redisService.get("zhz");
    }
}
